<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateRentingsTable extends Migration
{
    /**
     * 租客表
     */
    public function up()
    {
        Schema::create('rentings', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('openid',50)->default('')->comment("openid");
            $table->string('nickname',50)->default('')->comment("昵称");
            $table->string('phone',15)->default('')->comment("手机号");
            $table->enum('sex',['男','女'])->default('男')->comment("性别");
            $table->unsignedBigInteger('age')->default('0')->comment("年龄");
            $table->string('avatar',20)->default('')->comment("头像");
            $table->string('card',18)->default('')->comment("身份证号码");
            $table->string('card_img',255)->default('')->comment("身份证号码图片");
            $table->enum('is_auth',['0','1'])->default('0')->comment("是否认证");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('rentings');
    }
}
